/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.wpi.first.wpilibj.templates;

/**
 * current autonomous stage
 * @author robert
 */
public class Stage {
    public final int value;
    private Stage (int value) {
        this.value = value;
    }
    public static final int kStraight_val = 0;
    public static final int kRightTurn_val = 1;
    public static final int kLeftTurn_val = 2;
    public static final int kStopping_val = 3;
    public static final int kStraightenOut_val = 4;
    public static final int kFinished_val = 5;

    /**
     * name of current autonomous stage
     * @return string of autonomous stage
     */
    public String toString() {
        if(value == kStraight_val)
                return "straight";
        else if(value ==  kRightTurn_val)
            return "right turn";
        else if(value == kLeftTurn_val)
            return "left turn";
        else if(value == kStopping_val)
            return "stopping";
        else if(value == kStraightenOut_val)
            return "straighen out";
        else if(value == kFinished_val)
            return "finished";
        else
            return "unknown";
    }

    /**
     * going straight
     */
    public static final Stage kStraight = new Stage(kStraight_val);

    /**
     * right turn imminent
     */
    public static final Stage kRightTurn = new Stage(kRightTurn_val);

    /**
     * left turn imminent
     */
    public static final Stage kLeftTurn = new Stage(kLeftTurn_val);

    /**
     * Stopping T imminent - prepare to stop straight
     */
    public static final Stage kStopping = new Stage(kStopping_val);

    /**
     * reached T, straighten out
     */
    public static final Stage kStraightenOut = new Stage(kStraightenOut_val);

    /**
     * robot has stopped moving
     */
    public static final Stage kFinished = new Stage(kFinished_val);
}

